package com.aspose.cells;

import java.util.ArrayList;

public class DataLabels extends ChartFrame {
   private Object s;
   private byte t;
   byte[] l;
   ArrayList m;
   private boolean u = true;
   private boolean v;
   private int w = 1;
   private int x = 1;
   private int y;
   private ArrayList z;
   private String A;
   zik n;
   private boolean B = false;
   private boolean C = false;
   private int D = 0;
   boolean o = true;
   private boolean E;
   boolean p;
   private boolean F;
   private boolean G;
   private boolean H;
   private boolean I;
   private boolean J;
   private String K = null;
   private int L = 0;
   private boolean M = true;
   private int N = 0;
   private String O = "";
   boolean q = false;
   private int P = 3;
   boolean r = true;
   private static final com.aspose.cells.b.c.a.za Q = new com.aspose.cells.b.c.a.za(new String[]{", ", ". ", "; ", " ", "\n"});

   DataLabels(Object parent, Chart chart) {
      super(chart);
      this.s = parent;
      if (chart != null && chart.getChartArea() != null) {
         this.h = chart.getChartArea().getAutoScaleFont();
      }

      if (ChartCollection.g(chart.getType()) && ChartCollection.i(chart.getType())) {
         this.P = 0;
      }

      if (parent != null && parent instanceof Trendline) {
         this.b(6);
      } else {
         this.b(5);
      }

   }

   public boolean isAutoText() {
      return this.u;
   }

   public void setAutoText(boolean value) {
      this.u = value;
   }

   public boolean isDeleted() {
      return this.v;
   }

   public void setDeleted(boolean value) {
      this.v = value;
   }

   public int getTextHorizontalAlignment() {
      return this.w;
   }

   public void setTextHorizontalAlignment(int value) {
      switch(value) {
      case 1:
      case 3:
      case 6:
      case 7:
      case 8:
         this.w = value;
      case 2:
      case 4:
      case 5:
      default:
      }
   }

   public int getTextVerticalAlignment() {
      return this.x;
   }

   public void setTextVerticalAlignment(int value) {
      switch(value) {
      case 0:
      case 1:
      case 3:
      case 6:
      case 9:
         this.x = value;
      case 2:
      case 4:
      case 5:
      case 7:
      case 8:
      default:
      }
   }

   /** @deprecated */
   public int getRotation() {
      return this.y;
   }

   /** @deprecated */
   public void setRotation(int value) {
      this.setRotationAngle(value);
   }

   public int getRotationAngle() {
      return this.y;
   }

   public void setRotationAngle(int value) {
      if ((value < -90 || value > 90) && value != 255) {
         throw new IllegalArgumentException("Invalid rotation : it must be between -90 and 90 or equal 255");
      } else {
         this.y = value;
      }
   }

   ArrayList a() {
      return this.z;
   }

   void a(ArrayList var1) {
      this.z = var1;
   }

   public FontSetting characters(int startIndex, int length) {
      if (this.z == null) {
         this.z = new ArrayList();
      }

      FontSetting var3;
      for(int var4 = 0; var4 < this.z.size(); ++var4) {
         var3 = (FontSetting)this.z.get(var4);
         if (var3.getLength() == length && var3.getStartIndex() == startIndex) {
            return var3;
         }
      }

      var3 = new FontSetting(startIndex, length, this.getChart().j(), true);
      com.aspose.cells.b.a.a.ze.a(this.z, (Object)var3);
      return var3;
   }

   public String getText() {
      if (this.n != null) {
         this.A = this.n.i();
      } else if (this.S()) {
         DataLabels var1 = ((ChartPoint)this.L()).a().p();
         boolean var2 = false;
         boolean[] var3 = new boolean[]{var2};
         ArrayList var4 = var1.n.a(false, false, var3);
         var2 = var3[0];
         int var5 = ((ChartPoint)this.L()).a;
         if (var5 < var4.size()) {
            zit var6 = (zit)var4.get(var5);
            Workbook var7 = ((ChartPoint)this.L()).a().j().getWorkbook();
            String var8 = var6.c;
            if ((var8 == null || "".equals(var8)) && var6.b != 0) {
               var8 = var7.getSettings().e().d(var6.b);
            }

            zxz var9 = var7.getSettings().e().a(var8, var6.a, false);
            return var9.h();
         }
      }

      return this.A;
   }

   public void setText(String value) {
      this.A = value;
      this.n = null;
      this.u = false;
      if (value == null) {
         this.v = true;
      } else {
         this.v = false;
      }

      this.z = null;
   }

   String z() {
      return this.A;
   }

   void a(String var1) {
      this.A = var1;
   }

   public String getLinkedSource() {
      return this.n == null ? null : this.n.h();
   }

   public void setLinkedSource(String value) {
      if (value == null) {
         this.n = null;
         this.A = null;
      } else {
         Chart var2 = this.getChart();
         this.n = zin.a(var2.j(), var2.getWorksheet(), value);
         if (this.L() instanceof Series) {
            Series var3 = (Series)this.L();
            int var4 = var3.getPoints().getCount();

            for(int var5 = 0; var5 < var4; ++var5) {
               var3.getPoints().get(var5).getDataLabels().setText("[CELLRANGE]");
            }

            this.setShowCellRange(true);
         } else {
            this.setText(this.n.i());
         }
      }

   }

   void b(String var1) {
      Chart var2 = this.getChart();

      try {
         this.n = zin.a(var2.j(), var2.getWorksheet(), var1);
      } catch (Exception var4) {
         com.aspose.cells.a.c.zl.b(var4);
      }

   }

   boolean A() {
      return this.B;
   }

   void j(boolean var1) {
      this.B = var1;
   }

   boolean B() {
      return this.C;
   }

   void k(boolean var1) {
      this.C = var1;
   }

   public int getTextDirection() {
      return this.D;
   }

   public void setTextDirection(int value) {
      this.D = value;
   }

   public boolean isTextWrapped() {
      return this.o;
   }

   public void setTextWrapped(boolean value) {
      this.o = value;
      this.b((byte)10, value);
   }

   boolean C() {
      return this.getBorder().isVisible() || this.getArea().getFormatting() != 1;
   }

   Font D() {
      return this.g();
   }

   int E() {
      if (this.s instanceof ChartPoint) {
         return ((ChartPoint)this.s).b();
      } else {
         return this.s instanceof Series ? ((Series)this.s).getType() : 14;
      }
   }

   /** @deprecated */
   public int getBackground() {
      return this.i;
   }

   /** @deprecated */
   public void setBackground(int value) {
      this.setBackgroundMode(value);
   }

   public int getBackgroundMode() {
      return this.i;
   }

   public void setBackgroundMode(int value) {
      if (this.s != null && this.s instanceof Series) {
         Series var2 = (Series)this.s;
         if (var2.b() != null) {
            for(int var3 = 0; var3 < var2.getPoints().a(); ++var3) {
               ChartPoint var4 = var2.getPoints().c(var3);
               if (var4.j() != null) {
                  var4.getDataLabels().setBackgroundMode(value);
               }
            }
         }
      }

      this.i = value;
   }

   /** @deprecated */
   public boolean isValueShown() {
      return this.E;
   }

   /** @deprecated */
   public void setValueShown(boolean value) {
      this.setShowValue(value);
   }

   public boolean getShowValue() {
      if (!this.q && this.L() != null && this.L() instanceof ChartPoint) {
         ChartPoint var1 = (ChartPoint)this.L();
         Series var2 = var1.a();
         if (var2.p() != null && var2.getDataLabels().q) {
            return var2.getDataLabels().getShowValue();
         }
      }

      return this.E;
   }

   public void setShowValue(boolean value) {
      this.a((byte)0, value);
      if (this.E != value) {
         this.E = value;
         this.q = true;
      }
   }

   public boolean getShowCellRange() {
      if (!this.q && this.L() != null && this.L() instanceof ChartPoint) {
         ChartPoint var1 = (ChartPoint)this.L();
         Series var2 = var1.a();
         if (var2.p() != null && var2.getDataLabels().q) {
            return var2.getDataLabels().getShowCellRange();
         }
      }

      return this.p;
   }

   public void setShowCellRange(boolean value) {
      this.a((byte)11, value);
      if (this.p != value) {
         this.p = value;
         this.q = true;
      }
   }

   void a(int var1, boolean var2) {
      if (var2) {
         this.q = true;
      }

      switch(var1) {
      case 1:
         this.E = var2;
         break;
      case 2:
         this.F = var2;
         break;
      case 3:
         this.H = var2;
         break;
      case 4:
         this.G = var2;
         break;
      case 5:
         this.I = var2;
         break;
      case 6:
         this.p = var2;
      }

   }

   private void a(byte var1, boolean var2) {
      if (this.s instanceof Series) {
         Series var3 = (Series)this.s;
         if (var3.b() != null) {
            int var4 = var3.b().getCount();

            for(int var5 = 0; var5 < var4; ++var5) {
               ChartPoint var6 = var3.b().get(var5);
               if (var6.j() != null && !var6.j().q) {
                  switch(var1) {
                  case 0:
                     var6.getDataLabels().setShowValue(var2);
                     break;
                  case 1:
                     var6.getDataLabels().setShowPercentage(var2);
                     break;
                  case 2:
                     var6.getDataLabels().setShowCategoryName(var2);
                     break;
                  case 3:
                     var6.getDataLabels().setShowBubbleSize(var2);
                     break;
                  case 4:
                     var6.getDataLabels().setShowSeriesName(var2);
                     break;
                  case 5:
                     var6.getDataLabels().setShowLegendKey(var2);
                  case 6:
                  case 7:
                  case 8:
                  case 9:
                  default:
                     break;
                  case 10:
                     var6.getDataLabels().o = var2;
                     break;
                  case 11:
                     var6.getDataLabels().setShowCellRange(var2);
                  }
               }
            }

         }
      }
   }

   private void b(byte var1, boolean var2) {
      if (this.s instanceof Series) {
         Series var3 = (Series)this.s;
         if (var3.b() != null) {
            int var4 = var3.b().getCount();

            for(int var5 = 0; var5 < var4; ++var5) {
               ChartPoint var6 = var3.b().get(var5);
               if (var1 == 10) {
                  var6.getDataLabels().o = var2;
               }
            }

         }
      }
   }

   /** @deprecated */
   public boolean isPercentageShown() {
      return this.F;
   }

   /** @deprecated */
   public void setPercentageShown(boolean value) {
      this.setShowPercentage(value);
   }

   public boolean getShowPercentage() {
      if (!this.q && this.L() != null && this.L() instanceof ChartPoint) {
         ChartPoint var1 = (ChartPoint)this.L();
         Series var2 = var1.a();
         if (var2.p() != null && var2.getDataLabels().q) {
            return var2.getDataLabels().getShowPercentage();
         }
      }

      return this.F;
   }

   public void setShowPercentage(boolean value) {
      this.a((byte)1, value);
      this.q = true;
      if (this.F != value) {
         switch(this.E()) {
         case 35:
         case 36:
         case 44:
         case 45:
         case 46:
         case 47:
         case 48:
         case 49:
            this.F = value;
         case 37:
         case 38:
         case 39:
         case 40:
         case 41:
         case 42:
         case 43:
         }
      }

   }

   /** @deprecated */
   public boolean isBubbleSizeShown() {
      return this.G;
   }

   /** @deprecated */
   public void setBubbleSizeShown(boolean value) {
      this.setShowBubbleSize(value);
   }

   public boolean getShowBubbleSize() {
      if (!this.q && this.L() != null && this.L() instanceof ChartPoint) {
         ChartPoint var1 = (ChartPoint)this.L();
         Series var2 = var1.a();
         if (var2.p() != null && var2.getDataLabels().q) {
            return var2.getDataLabels().getShowBubbleSize();
         }
      }

      return this.G;
   }

   public void setShowBubbleSize(boolean value) {
      this.a((byte)3, value);
      if (this.G != value) {
         switch(this.E()) {
         case 12:
         case 13:
            this.G = value;
         }
      }

      this.q = true;
   }

   public boolean getShowCategoryName() {
      if (!this.q && this.L() != null && this.L() instanceof ChartPoint) {
         ChartPoint var1 = (ChartPoint)this.L();
         Series var2 = var1.a();
         if (var2.p() != null && var2.getDataLabels().q) {
            return var2.getDataLabels().getShowCategoryName();
         }
      }

      return this.H;
   }

   public void setShowCategoryName(boolean value) {
      this.a((byte)2, value);
      this.q = true;
      if (this.H != value) {
         this.H = value;
      }

   }

   /** @deprecated */
   public boolean isCategoryNameShown() {
      return this.H;
   }

   /** @deprecated */
   public void setCategoryNameShown(boolean value) {
      this.setShowCategoryName(value);
   }

   /** @deprecated */
   public boolean isSeriesNameShown() {
      return this.I;
   }

   /** @deprecated */
   public void setSeriesNameShown(boolean value) {
      this.setShowSeriesName(value);
   }

   public boolean getShowSeriesName() {
      if (!this.q && this.L() != null && this.L() instanceof ChartPoint) {
         ChartPoint var1 = (ChartPoint)this.L();
         Series var2 = var1.a();
         if (var2.p() != null && var2.getDataLabels().q) {
            return var2.getDataLabels().getShowSeriesName();
         }
      }

      return this.I;
   }

   public void setShowSeriesName(boolean value) {
      this.a((byte)4, value);
      this.I = value;
      this.q = true;
   }

   /** @deprecated */
   public boolean isLegendKeyShown() {
      if (!this.q && this.L() != null && this.L() instanceof ChartPoint) {
         ChartPoint var1 = (ChartPoint)this.L();
         Series var2 = var1.a();
         if (var2.p() != null && var2.getDataLabels().q) {
            return var2.getDataLabels().getShowLegendKey();
         }
      }

      return this.J;
   }

   /** @deprecated */
   public void setLegendKeyShown(boolean value) {
      this.setShowLegendKey(value);
   }

   public boolean getShowLegendKey() {
      return this.J;
   }

   public void setShowLegendKey(boolean value) {
      this.a((byte)5, value);
      this.J = value;
      this.q = true;
   }

   void l(boolean var1) {
      this.J = var1;
   }

   public String getNumberFormat() {
      if (!this.I() && this.s != null && this.s instanceof ChartPoint) {
         ChartPoint var1 = (ChartPoint)this.L();
         DataLabels var2 = var1.a().p();
         if (var2 != null && var2.I()) {
            return var2.K;
         }
      }

      if (this.K == null) {
         if (!this.getNumberFormatLinked() && this.getNumber() != 0) {
            return this.getChart().getWorksheet().getWorkbook().getSettings().e().d(this.getNumber());
         }

         if (this.getNumberFormatLinked()) {
            String var3 = this.T();
            if (var3 != null) {
               return var3;
            }
         }
      }

      return this.K;
   }

   public void setNumberFormat(String value) {
      this.t = (byte)(this.t | 1);
      this.K = value;
      this.L = 0;
      this.M = false;
      if (this.s != null && this.s instanceof Series) {
         Series var2 = (Series)this.s;
         if (var2.b() != null) {
            for(int var3 = 0; var3 < var2.getPoints().a(); ++var3) {
               ChartPoint var4 = var2.getPoints().c(var3);
               if (var4.j() != null) {
                  var4.getDataLabels().setNumberFormat(value);
               }
            }
         }
      }

   }

   private String T() {
      Series var1 = null;
      ChartPoint var2 = null;
      if (this.s != null) {
         if (this.s instanceof Series) {
            var1 = (Series)this.s;
         } else if (this.s instanceof ChartPoint) {
            var2 = (ChartPoint)this.L();
            var1 = var2.a();
         }
      }

      if (var1 != null && this.getNumberFormatLinked()) {
         boolean var3 = false;
         boolean[] var5 = new boolean[]{var3};
         ArrayList var4 = var1.l().a(true, false, var5);
         var3 = var5[0];
         int var8 = 0;
         if (var2 != null) {
            var8 = var2.a;
         }

         if (var4.size() > var8) {
            zit var6 = (zit)var4.get(var8);
            String var7 = var6.c;
            if ((var7 == null || "".equals(var7)) && var6.b != 0) {
               var7 = this.getChart().getWorksheet().getWorkbook().getSettings().e().d(var6.b);
            }

            return var7;
         }
      }

      return null;
   }

   String F() {
      return this.K;
   }

   void c(String var1) {
      this.K = var1;
      this.L = 0;
      this.M = false;
      this.t = (byte)(this.t | 1);
   }

   public int getNumber() {
      if (!this.I() && this.s != null && this.s instanceof ChartPoint) {
         ChartPoint var1 = (ChartPoint)this.L();
         DataLabels var2 = var1.a().p();
         if (var2 != null && var2.I()) {
            if (var2.L >= 0 && var2.L < 59) {
               return (byte)var2.L;
            }

            return 0;
         }
      }

      return this.L >= 0 && this.L < 59 ? (byte)this.L : 0;
   }

   public void setNumber(int value) {
      if (value < 59 && value >= 0) {
         this.K = null;
         this.L = value;
      } else {
         this.L = value;
      }

      this.M = false;
      this.t = (byte)(this.t | 1);
   }

   int G() {
      return this.L;
   }

   void a(int var1) {
      this.L = var1;
   }

   public boolean getNumberFormatLinked() {
      if (!this.I() && this.s != null && this.s instanceof ChartPoint) {
         ChartPoint var1 = (ChartPoint)this.L();
         DataLabels var2 = var1.a().p();
         if (var2 != null && var2.I()) {
            return var2.M;
         }
      }

      return this.M;
   }

   public void setNumberFormatLinked(boolean value) {
      this.M = value;
      this.t = (byte)(this.t | 1);
   }

   void m(boolean var1) {
      this.M = var1;
      this.t = (byte)(this.t | 1);
   }

   boolean H() {
      return this.M;
   }

   boolean I() {
      return (this.t & 255 & 1) != 0;
   }

   void n(boolean var1) {
      if (var1) {
         this.t = (byte)(this.t | 1);
      } else {
         this.t = (byte)(this.t & 254);
      }

   }

   public Font getFont() {
      Chart var1 = this.getChart();
      ChartPoint var2;
      if (this.f == null && this.h() == -1 && this.s != null && this.s instanceof ChartPoint) {
         var2 = (ChartPoint)this.L();
         DataLabels var3 = var2.a().p();
         if (var3 != null) {
            if (var3.f != null || var3.h() != -1) {
               this.f = new Font(var1.j(), (Object)null, true);
               Font var7 = var3.getFont();
               this.f.c(var7);
               if (this.getAutoScaleFont()) {
                  this.f.a((Object)(new zbi(this.getChart(), var7.getSize(), true)));
               }

               return this.f;
            }

            if (var3.I() && !this.I()) {
               this.L = var3.L;
               this.K = var3.K;
               this.n(true);
            }
         }
      }

      if (this.f == null) {
         this.f = new Font(var1.j(), (Object)null, true);
         this.f.setSize(10);
         var2 = null;
         Font var5;
         if (this.g != -1) {
            var5 = this.getChart().j().j(this.g);
            this.f.c(var5);
            this.f.b.b(true);
            zbi var6 = this.getChart().c(this.g);
            if (var6 != null) {
               zbi var4 = new zbi(var6.f, 0, false);
               var4.a(var6);
               this.f.a((Object)var4);
            }
         } else {
            var5 = var1.getChartArea().getFont();
            this.f.c(var5);
            if (this.getAutoScaleFont()) {
               this.f.a((Object)(new zbi(this.getChart(), 10, true)));
            }
         }
      }

      return this.f;
   }

   public int getSeparator() {
      if (!this.K() && this.L() instanceof ChartPoint) {
         ChartPoint var1 = (ChartPoint)this.L();
         DataLabels var2 = var1.a().p();
         if (var2 != null && var2.K()) {
            return var2.getSeparator();
         }
      }

      if (this.N == 0) {
         int var3 = 14;
         if (this.L() instanceof ChartPoint) {
            var3 = ((ChartPoint)this.L()).a().getType();
         } else if (this.L() instanceof Series) {
            var3 = ((Series)this.L()).getType();
         }

         if (ChartCollection.c(var3) && this.getShowCategoryName() && this.getShowPercentage() && !this.getShowSeriesName() && !this.getShowValue()) {
            return 5;
         }
      }

      return this.N;
   }

   public void setSeparator(int value) {
      this.o(value);
   }

   private void o(int var1) {
      this.N = var1;
      this.p(var1);
      this.t = (byte)(this.t | 2);
   }

   private void p(int var1) {
      switch(var1) {
      case 1:
         this.O = " ";
         break;
      case 2:
         this.O = ", ";
         break;
      case 3:
         this.O = "; ";
         break;
      case 4:
         this.O = ". ";
         break;
      case 5:
         this.O = "\n";
      }

   }

   int J() {
      return this.N;
   }

   boolean K() {
      return (this.t & 255 & 2) != 0;
   }

   public String getSeparatorValue() {
      if (!this.K() && this.L() instanceof ChartPoint) {
         ChartPoint var1 = (ChartPoint)this.L();
         DataLabels var2 = var1.a().p();
         if (var2 != null && var2.K()) {
            return var2.getSeparatorValue();
         }
      }

      String var3 = "";
      if (this.O != null) {
         var3 = this.O;
      } else {
         var3 = "";
      }

      if ("".equals(var3) && !this.K()) {
         int var4 = 14;
         if (this.L() instanceof ChartPoint) {
            var4 = ((ChartPoint)this.L()).a().getType();
         } else if (this.L() instanceof Series) {
            var4 = ((Series)this.L()).getType();
         }

         if (ChartCollection.c(var4) && this.getShowCategoryName() && this.getShowPercentage() && !this.getShowSeriesName() && !this.getShowValue()) {
            return "\n";
         }
      }

      return var3;
   }

   public void setSeparatorValue(String value) {
      if (value != null && !"".equals(value)) {
         switch(Q.a(value)) {
         case 0:
            this.setSeparator(2);
            break;
         case 1:
            this.setSeparator(4);
            break;
         case 2:
            this.setSeparator(3);
            break;
         case 3:
            this.setSeparator(1);
            break;
         case 4:
            this.setSeparator(5);
            break;
         default:
            this.setSeparator(6);
         }

         if (value.length() > 255) {
            this.O = value.substring(0, 255);
         } else {
            this.O = value;
         }
      } else {
         this.setSeparator(0);
      }

   }

   void a(DataLabels var1, CopyOptions var2) {
      super.a(var1, var2);
      this.t = var1.t;
      this.N = var1.N;
      this.O = var1.O;
      this.y = var1.y;
      this.w = var1.w;
      this.x = var1.x;
      this.B = var1.B;
      this.D = var1.D;
      this.H = var1.H;
      this.F = var1.F;
      this.E = var1.E;
      this.J = var1.J;
      this.G = var1.G;
      this.I = var1.I;
      this.p = var1.p;
      this.q = var1.q;
      this.P = var1.P;
      this.r = var1.r;
      this.K = var1.K;
      this.L = var1.L;
      this.M = var1.M;
      this.u = var1.u;
      this.v = var1.v;
      if (var1.getLinkedSource() != null) {
         this.b(var1.getLinkedSource());
      }

      this.A = var1.A;
      if (var1.a() != null && var1.a().size() > 0) {
         this.z = new ArrayList();

         for(int var3 = 0; var3 < var1.z.size(); ++var3) {
            FontSetting var4 = (FontSetting)var1.z.get(var3);
            FontSetting var5 = new FontSetting(var4.getStartIndex(), var4.getLength(), this.getChart().j(), true);
            var5.getFont().c(var4.getFont());
            com.aspose.cells.b.a.a.ze.a(this.z, (Object)var5);
         }
      }

   }

   void b(DataLabels var1, CopyOptions var2) {
      super.b(var1, var2);
   }

   void a(DataLabels var1) {
      this.K = var1.K;
      this.L = var1.L;
      this.M = var1.M;
   }

   void b(DataLabels var1) {
      this.t = var1.t;
      this.N = var1.N;
      this.O = var1.O;
   }

   void c(DataLabels var1) {
      this.H = var1.H;
      this.F = var1.F;
      this.E = var1.E;
      this.J = var1.J;
      this.G = var1.G;
      this.I = var1.I;
      this.q = var1.q;
      this.P = var1.P;
      this.r = var1.r;
   }

   boolean d(DataLabels var1) {
      if (this.t != var1.t) {
         return false;
      } else if (this.N != var1.N) {
         return false;
      } else if (this.y != var1.y) {
         return false;
      } else if (this.w != var1.w) {
         return false;
      } else if (this.x != var1.x) {
         return false;
      } else if (this.D != var1.D) {
         return false;
      } else if (!com.aspose.cells.b.a.zv.b(this.A, var1.A)) {
         return false;
      } else if (this.H != var1.H) {
         return false;
      } else if (this.F != var1.F) {
         return false;
      } else if (this.E != var1.E) {
         return false;
      } else if (this.J != var1.J) {
         return false;
      } else if (this.G != var1.G) {
         return false;
      } else if (this.I != var1.I) {
         return false;
      } else if (this.P != var1.P) {
         return false;
      } else if (this.r != var1.r) {
         return false;
      } else if (!com.aspose.cells.b.a.zv.b(this.K, var1.K)) {
         return false;
      } else if (this.L != var1.L) {
         return false;
      } else if (this.M != var1.M) {
         return false;
      } else if (this.u != var1.u) {
         return false;
      } else if (this.v = var1.v) {
         return false;
      } else {
         return super.a((ChartFrame)var1);
      }
   }

   Object L() {
      return this.s;
   }

   boolean M() {
      return this.s instanceof Series;
   }

   boolean N() {
      if (this.I) {
         return true;
      } else {
         int var1 = 0;
         if (this.E) {
            ++var1;
         }

         if (this.getShowCategoryName()) {
            ++var1;
         }

         if (this.getShowPercentage()) {
            ++var1;
         }

         if (this.G) {
            ++var1;
         }

         if (var1 == 2 && this.getShowCategoryName() && this.getShowPercentage()) {
            return false;
         } else {
            return var1 > 1;
         }
      }
   }

   boolean O() {
      boolean var1 = ChartCollection.p(this.getChart().getType());
      if (var1) {
         if (this.H) {
            return true;
         }
      } else if (this.I) {
         return true;
      }

      int var2 = 0;
      if (this.E) {
         ++var2;
      }

      if (var1) {
         if (this.I) {
            ++var2;
         }
      } else if (this.H) {
         ++var2;
      }

      if (this.F) {
         ++var2;
      }

      if (this.G) {
         ++var2;
      }

      if (var2 == 2 && this.getShowCategoryName() && this.getShowPercentage() && this.N == 0) {
         return false;
      } else {
         return var2 > 1;
      }
   }

   boolean P() {
      return this.G || this.H || this.F || this.E;
   }

   boolean Q() {
      return this.P() || this.getShowSeriesName();
   }

   boolean R() {
      if (this.z() != null && !this.isDeleted()) {
         return true;
      } else if (ChartCollection.c(this.E())) {
         return this.getShowSeriesName() || this.H || this.E || this.F || this.getShowCellRange();
      } else if (ChartCollection.q(this.E())) {
         return this.getShowSeriesName() || this.H || this.E || this.G || this.getShowCellRange();
      } else {
         return this.getShowSeriesName() || this.H || this.E || this.getShowCellRange();
      }
   }

   public int getPosition() {
      if (this.s != null & this.s instanceof ChartPoint && this.r) {
         ChartPoint var1 = (ChartPoint)this.L();
         DataLabels var2 = var1.a().p();
         if (var2 != null && var2.r) {
            return var2.getPosition();
         }
      } else if (this.r && ChartCollection.c(this.getChart().getType())) {
         return 8;
      }

      return this.P;
   }

   public void setPosition(int value) {
      if (this.P == value) {
         this.r = false;
      } else {
         switch(value) {
         case 0:
            this.r = false;
            this.P = value;
            break;
         case 1:
         case 2:
            if (ChartCollection.g(this.E()) || ChartCollection.c(this.E())) {
               this.r = false;
               this.P = value;
            }
            break;
         case 3:
            if (ChartCollection.g(this.E()) && !ChartCollection.i(this.E()) || ChartCollection.c(this.E())) {
               this.r = false;
               this.P = value;
            }
            break;
         case 4:
         case 5:
         case 6:
         case 7:
            if (ChartCollection.n(this.E()) || ChartCollection.k(this.E()) || ChartCollection.q(this.E())) {
               this.r = false;
               this.P = value;
            }
            break;
         case 8:
            if (ChartCollection.c(this.E())) {
               this.r = false;
               this.P = value;
            }
         }

      }
   }

   void n(int var1) {
      this.P = var1;
      this.r = false;
   }

   boolean S() {
      if (this.A != null && "[CELLRANGE]".equals(this.A) && this.L() instanceof ChartPoint) {
         DataLabels var1 = ((ChartPoint)this.L()).a().p();
         if (var1 != null && var1.n != null) {
            return true;
         }
      }

      return false;
   }
}
